package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.wemedia.pojos.WmNewsMaterial;
import com.heima.wemedia.entity.MaterialIdAndType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author brianxia
 * @version 1.0
 * @date 2022-11-13 15:22
 */
@Mapper
public interface MaterialNewsMapper extends BaseMapper<WmNewsMaterial> {
    void insertBatch(@Param("materialIds") List<Integer> ids,
                     @Param("newsId") Integer id,
                     @Param("type") short type);

    void insertBatch2(@Param("materials") List<MaterialIdAndType> materialIdAndTypes
                    , @Param("newsId") Integer id);
}
